{% extends "base_detail.html" %}

{% load i18n %}
{% load breadcrumbs %}
{% load avatar %}
{% load menu %}
{% load details %}

{% block breadcrumbs %}
    {% add_crumb 'Home' '/' %}
    {% add_crumb 'Contacts' 'contact_list' %}
    {% add_crumb object %}
{% endblock %}

{% block objectactions %}
{% if perms.partners.add_contact %}
<li class="add"><a title="{% trans 'Add' %}" href="{% url contact_add %}">{% trans 'Add' %}</a></li>
{% endif %}
{% if object.pk in obj_perms.partners.change_contact %}
<li class="edit"><a title="{% trans 'Edit' %}" href="{% url contact_edit object.pk %}">{% trans 'Edit' %}</a></li>
{% endif %}
{% if object.pk in obj_perms.partners.delete_contact %}
<li class="delete"><a title="{% trans 'Delete' %}" href="{% url contact_delete object.pk %}">{% trans 'Delete' %}</a></li>
{% endif %}
{% if perms.partners.view_contact %}
<li class="all"><a title="{% trans 'All' %}" href="{% url contact_list %}">{% trans 'All' %}</a></li>
{% endif %}
{% endblock %}

{% block objectmenu %}{% menu "contact_menu" %}{% endblock %}

{% block section %}
<div class="details">
    {% avatar object 90 %}
    <table class="properties">
        {% property_table object "['full_name', ['nickname', 'date_of_birth'], ['gender', 'ssn'], ['language', 'timezone'], ['email', 'url'],  ['main_address', 'main_phone_number'], 'user', 'tags', 'categories']" %}
    </table>
</div>
{% include "elements/comments.html" %}
{% endblock %}
